package com.byit.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author wangx
 * @since 2019-01-16
 */
@Data
@TableName("sys_behavior_log")
public class SysBehaviorLog extends Model<SysBehaviorLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 模块标题
     */
    private String title;
    /**
     * 方法名称
     */
    private String method;
    /**
     * 来源渠道
     */
    private String channel;
    /**
     * 操作类型
     */
    @TableField("oper_type")
    private String operType;
    /**
     * 请求URL
     */
    @TableField("oper_url")
    private String operUrl;
    /**
     * 主机地址
     */
    @TableField("oper_ip")
    private String operIp;
    /**
     * 请求参数
     */
    @TableField("oper_param")
    private String operParam;
    /**
     * 操作状态（0正常 1系统异常 2操作异常）
     */
    private String status;
    /**
     * 错误消息
     */
    @TableField("error_msg")
    private String errorMsg;
    /**
     * 操作时间
     */
    @TableField("oper_time")
    private Date operTime;
    /**
     * 操作公司编码
     */
    @TableField("oper_com_code")
    private String operComCode;
    /**
     * 调用接口应用编码
     */
    @TableField("oper_app_code")
    private String operAppCode;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysBehaviorLog{" +
                ", id=" + id +
                ", title=" + title +
                ", method=" + method +
                ", channel=" + channel +
                ", operType=" + operType +
                ", operUrl=" + operUrl +
                ", operIp=" + operIp +
                ", operParam=" + operParam +
                ", status=" + status +
                ", errorMsg=" + errorMsg +
                ", operTime=" + operTime +
                ", operComCode=" + operComCode +
                ", operAppCode=" + operAppCode +
                "}";
    }
}
